package com.qa.service;

import com.github.pagehelper.PageInfo;
import com.qa.common.ServerResponse;
import com.qa.pojo.Article;
import com.qa.vo.ArticleVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface IArticleService {
    ServerResponse add(HttpServletRequest request, Article article);

    PageInfo<Article> getByEmail(String email, Integer pageNum, Integer pageSize);

    Article getById(Integer articleId);

    PageInfo<Article> getByArticleName(String articleName, Integer pageNum, Integer pageSize);

    ServerResponse update(Article article);

    PageInfo<ArticleVo> getAll(Integer pageNum, Integer pageSize);

    List<Article> getByRandom();

    ServerResponse deleteById(Integer articleId);

    int getCount(String beginTime, String endTime);

    List<Article> getAllByArticleName(String articleName);
}
